﻿
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;

using Game.Surface;

namespace SL
{
    public partial class CommandDlg 
    {
        public CommandDlg(AppSurfaceControl surfaceControl)
        {
            DebugPlugin.DebugPlugin.Instance.Init(
                surfaceControl.GameController.CommandExecutor,
                surfaceControl.GameMapView,
                surfaceControl.GameController.GameLevels);
            InitializeComponent();
        }

        private void OKButton_Click(object sender, RoutedEventArgs e)
        {
            DialogResult = true;
        }

        private void CancelButton_Click(object sender, RoutedEventArgs e)
        {
            DialogResult = false;
        }

        private void textBox1_TextInput(object sender, TextCompositionEventArgs e)
        {
//            string expression = textBox1.Text;
//            //const string expression = "w x z - +";
//            var sentence = new Evaluator(expression);
//            var variables = new Dictionary<string, ICodeObject>();
//            variables["w"] = new Number(5);
//            variables["x"] = new Number(10);
//            variables["z"] = new Number(42);
//            object result = sentence.Interpret(variables);
//            textBox2.Text += "" + result + "\r\n";
        }
    }
}